package com.lhb.user.mapper;

import com.lhb.user.model.Passenger;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.web.bind.annotation.DeleteMapping;

import java.util.List;

@Mapper
public interface PassengerMapper {

   // @Insert("insert into passenger(name, certificate_type, certificate_number, email, phone, user_id) values (#{name},#{certificateType},#{certificateNumber},#{email},#{phone},#{userId})")
     void addPassenger(Passenger passenger) ;
    @Select("select * from passenger where user_id=#{user}")
    List<Passenger> getPassenger(Long user);
    @Delete("delete from passenger where id=#{id}")
    void deletePassenger(Long id);
}
